<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title><?php echo ($title); ?></title>
    <link rel="stylesheet" href="/Public/web/css/pintuer.css">
    <link rel="stylesheet" href="/Public/web/css/admin.css">
    <script src="/Public/web/js/jquery.js"></script>
    <script src="/Public/web/js/pintuer.js"></script>
</head>


<body>
  <div class="panel admin-panel">
    <div class="panel-head"><strong><span class="icon-pencil-square-o"></span> <?php echo L("shangjiaxinxi");?></strong></div>
    <div class="body-content">
      <form method="post" class="form-x" action="" enctype="multipart/form-data">
        <div class="form-group">
          <div class="label">
            <label><?php echo L("dengluzhanghao");?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="user_name" value="<?php echo ($info['user_name']); ?>" data-validate="required:<?php echo L('qingshuru'); echo L('dengluzhanghao');?>"/>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L("denglumima");?>：</label>
          </div>
          <div class="field">
            <input id="password" type="text" class="input w50" name="password" value="" placeholder="<?php echo ($info['password']); ?>" />
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L("shanghumingzi");?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="company_name" value="<?php echo ($info['company_name']); ?>" data-validate="required:<?php echo L('qingshuru'); echo L('shanghumingzi');?>"/>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L("shanghulogo");?>：</label>
          </div>
          <div class="field">
            <input type="file" class="button bg-blue" name="company_logo" value="+ <?php echo L('liulanshangchuan');?>" onchange="preview(this)" style="float: left;">
            <div id="preview" name="img" style="float: left;width: 10%;box-sizing: border-box;" class="input" >
              <?php if(empty($info['company_logo'])): ?><img src="/Public/images/zanwu.jpg" width="100%" />
                <?php else: ?>
                <img src="/<?php echo ($info['company_logo']); ?>" width="100%" /><?php endif; ?>
            </div>
            <div class="tipss"><?php echo L("tuijianchicun");?>：100*100</div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L("lianxiren");?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="full_name" value="<?php echo ($info['full_name']); ?>" />
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L("lianxishouji");?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="tel" value="<?php echo ($info['tel']); ?>" />
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label></label>
          </div>
          <div class="field">
            <button class="button bg-main icon-check-square-o" type="submit"> <?php echo L("tijiao");?></button>
          </div>
        </div>
      </form>
    </div>
  </div>
  <script type="text/javascript">
    function preview(file){
      var prevDiv = document.getElementById('preview');
      if (file.files && file.files[0]){
        var reader = new FileReader();
        reader.onload = function(evt){
          prevDiv.innerHTML = '<img src="' + evt.target.result + '" width="100%" />';
        }
        reader.readAsDataURL(file.files[0]);
      }
      else{
        prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
      }
    }
  </script>
</body>

</html>